package com.example.pets.view.activity;

import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.pets.MainActivity;
import com.example.pets.model.entities.database.ShareprefenseUtil;

public class LauncherActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        boolean islogin=ShareprefenseUtil.getinstanse().islogin();

        if (islogin) {
            startActivity(new Intent(this, MainActivity.class));
        } else {
            startActivity(new Intent(this, AuthActivity.class));
        }
        finish(); // 不保留此页面
    }
}
